package com.bitongchong.test;

public class Code_03_OJ2 {
	public static void process(int n, String from, String to, String help) {
		if (n == 1) {
			System.out.println("把第1个从" + from + "移到" + to);
		} else {
			process(n - 1, from, help, to);
			System.out.println("把第" + n + "个从" + from + "移到" + to);
			process(n - 1, help, to, from);
		}
	}

	public static void main(String[] args) {
		process(10, "左", "右", "中");
	}
}